﻿using GrainManage.Data.Model;
using GrainManage.Data.Model.Filter;
using GrainManage.Data.Model.Table;
using GrainManage.Data.Model.View;
using System.Collections.Generic;

namespace GrainManage.Core.Service.Interfaces
{
    public interface ITradeService
    {
        TradeTable Get(int tradeID, string creator);

        List<TradeDetailView> GetDetailByContactID(int contactID, IPageable page, ICountable records, string creator);

        List<TradeDetailView> SearchDetail(TradeTotalWithContactFilter filter, IPageable page, ICountable records, string creator);

        List<TradeTotalView> GetTotal(TradeTotalFilter filter, IPageable page, ICountable records, string creator);

        List<TradeTotalWithAreaView> GetTotalByArea(TradeTotalWithAreaFilter filter, IPageable page, ICountable records, string creator);

        List<TradeWithContactView> GetTotalByContactArea(TradeTotalWithContactFilter filter, IPageable page, ICountable records, string creator);

        int Insert(TradeTable trade);

        int Update(TradeTable trade);

        int Delete(int priceID, string creator);

        List<int> Insert(List<TradeTable> trades);

        List<int> Update(List<TradeTable> trades);

        List<int> Delete(List<int> trades, string creator);
    }
}
